package com.yisu.auction.ewf.common.enums;

/**
 * Created by zj on 2017/7/19.
 */
public enum AppTerraceChannelEnum {

    COM_DDBAOXIANG_TREASUREBOX("com.ddbaoxiang.treasurebox","叮叮宝箱"),
    COM_DDBX_TREASUREBOX("com.ddbx.treasurebox","叮叮宝箱IOS"),
    COM_DDWB_TREASUREBOX("com.ddwb.treasurebox","叮叮挖宝"),
    COM_LAIDUOBAO_TREASUREBOX("com.laiduobao.trbox","来夺宝"),
    com_QULE_DB("com.qule.db","叮叮宝箱-李");
    public String code;
    public String name;
    AppTerraceChannelEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String getEnumNameByCode(String code) {
        for (AppTerraceChannelEnum item : AppTerraceChannelEnum.values()) {
            if (item.code.equals(code))
                return item.name;
        }
        return null;
    }

    public static String getEnumCodeByName(String name) {
        for (AppTerraceChannelEnum item : AppTerraceChannelEnum.values()) {
            if (item.name.equals(name))
                return item.code;
        }
        return null;
    }
}
